<template>
  <div>
    <h1 class="container">container</h1>
  </div>
</template>

<script>
import {onMounted,onBeforeMount}  from  'vue'
export default {
  setup () {
    
    onMounted(()=>{
      console.log('onMounted');
       console.log('DOM渲染前=====onMounted',document.querySelector('.container'))
    })

     onMounted(()=>{
      console.log('onMounted2222');
    })

    onBeforeMount(()=>{
      console.log('DOM渲染前',document.querySelector('.container'))
    })

    return {}
  }
}
</script>

<style lang="scss" scoped>

</style>